chore: reduce measured legacy code-health debt - #49
Merged
Conversation
- Remove unused Note import in local-library.ts (lint warning 39→38) - Split isBlockedIp into isBlockedIpv4/isBlockedIpv6 helpers (complexity violations 37→35) - Consolidate ShareDialog and ArticleShareDialog into shared ShareLinkDialog (duplication 37→32 groups, 493→413 lines) - Lower checked-in baselines to reflect improvements Progress on #42
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
reader | 68d6223 | Aug 14 2026, 08:56 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Targeted, behavior-preserving improvements to reduce measured code-health debt tracked by issue #42.
Changes
Lint warnings: 39 → 38
Noteimport insrc/lib/local-library.ts— the type was imported but never referenced.Complexity violations: 37 → 35
isBlockedIpinsrc/lib/url-validation.tsintoisBlockedIpv4andisBlockedIpv6helpers, withisBlockedIpas a thin dispatcher. The original function had CCN 22; the split functions are each well under the threshold. All existing SSRF tests pass unchanged.Duplication: 37 → 32 groups, 493 → 413 lines
ShareDialogandArticleShareDialoginto a sharedShareLinkDialogcomponent (src/components/ui/ShareLinkDialog.tsx). The two original components were ~95% identical (differing only in API path, share URL prefix, and entity label). Both are now thin wrappers that preserve their existing props API — no caller changes needed.Baselines lowered
scripts/check-code-health.mjsbaselines updated to reflect the new measured values.Validation
pnpm quality(full gate) passes: format, lint, typecheck, test:coverage, extension type-check/test/build, unused, complexity, duplication, cycles, dependencies, suppressions, docs:check, cf:build, hygiene.Progress on #42